﻿@model N03_11HCA_HTTTHD.Models.Home
@{
    ViewBag.Title = "Trang chủ";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


@section TimKiemImport{
    <form action="" id="search-form">                
        <fieldset>
        <input class="text" value="" />
        <input type="submit" value="Tìm kiếm" />
        </fieldset>
    </form>
}

@section JavaScriptCSSImport{
    <link href="@Url.Content("~/Content/mycontent/list_counter.css")" rel="stylesheet" type="text/css"/>
}

@section MenuTraiImport{
    @Html.Action("MenuTraiCanBan", "Home");
    @Html.Action("MenuTraiTimMua", "Home");
}

@section MenuImport{
    <ul class="nav">
        <li><a href="/ChaoBan">Chào bán</a></li>
        <li><a href="/TimMua">Tìm mua</a></li>
        <li><a href="/DoanhNghiep">Doanh nghiệp</a></li>
        <li><a href="/TinTuc">Tin tức</a></li>
    </ul>
}

@section JavaScriptDocumentReady{
    
    
    //load danh sách tìm mua
}

<h2>Tin tức</h2>
<!-- -->
<div class="css3droppanel">
    <input type="checkbox" id="paneltoggle1" checked="checked" />
    <label for="paneltoggle1" title="Click to open Panel">
    </label>
    <div class="content">
        <!--panel content goes here-->
        <ul class="counter" >
        <!-- -->
        @for (int i = 0; i < Model.ListTinTuc.Count; i++)
        {
            Data_DAO_DTO_Lib.DTO.TINTUC_DTO cb = Model.ListTinTuc[i];
        
             <li @if (i % 2 == 0)
                 {@Html.Raw("class='shadow_item'")}>
                    <h3>
                        <a href="TinTuc/ChiTiet/@cb.ID">@cb.TieuDe</a></h3>
                        <span>@cb.NgayDang</span><br/>
                        <p class="autohide chaobanpreview">@cb.NoiDung</p>
                </li>
        }
        </ul>
        <!-- end panel content -->
    </div>
</div>
<!--	-->
<h2>Chào bán mới</h2>
<!-- -->
<div class="css3droppanel">
    <input type="checkbox" id="paneltoggle2" checked="checked" />
    <label for="paneltoggle2" title="Click to open Panel">
    </label>
    <div class="content">
        <!--panel content goes here-->
        <ul class="counter">
        <!-- -->
            @for (int i = 0; i < Model.ListChaoBan.Count; i++)
            {
                Data_DAO_DTO_Lib.DTO.THONGTINCANBAN_DTO cb = Model.ListChaoBan[i];
        
                <li @if (i % 2 == 0)
                    {@Html.Raw("class='shadow_item'")}>
                    <img src="@Url.Content("~/Content/HinhAnh/")@cb.HinhAnhDinhKem" alt="" />
                    @{String ten = @cb.TenViet + "-" + @cb.TenAnh;}
                    
                    <h3><a href="ChaoBan/ChiTiet/@cb.ID">@cb.TenViet - @cb.TenAnh</a></h3>
                    <span class="quanTamChaoBan" accesskey="@cb.ID" title="Quan tâm chào bán: @ten"></span>
                    <a class="mailToMini" title="Liên hệ với người chào bán: @ten" href="/Home/LienHe/@Model.ListTimMua[i].IDNguoiDang/[Cần bán @cb.ID] @ten"></a>
                    <span>Thời gian đăng: @cb.NgayDang</span><br/>
                    <p class="autohide chaobanpreview">@cb.MoTa</p>
                </li>
            }
        </ul>
        <!-- end panel content -->
    </div>
</div>
<!--	-->
<h2>
    Tìm mua mới</h2>
<!-- -->
<div class="css3droppanel">
    <input type="checkbox" id="paneltoggle3" checked="checked" />
    <label for="paneltoggle3" title="Click to open Panel">
    </label>
    <div class="content">
        <!--panel content goes here-->
        <ul class="counter">
            <!---->
            @for (int i = 0; i < Model.ListTimMua.Count; i++)
            {
                Data_DAO_DTO_Lib.DTO.THONGTINTIMMUA_DTO tm = Model.ListTimMua[i];
        
                 <li @if (i % 2 == 0)
                     {@Html.Raw("class='shadow_item'")}>
                      @{String ten = @tm.TenViet + "-" + @tm.TenAnh;}
                        
                        <h3><a href="TimMua/ChiTiet/@tm.ID">@ten </a></h3>
                        <span class="quanTamTimMua" accesskey="@tm.ID" title="Quan tâm tìm mua: @ten"></span>
                        <a class="mailToMini" title="Liên hệ với người tìm mua: @ten" href="/Home/LienHe/@Model.ListTimMua[i].IDNguoiDang/[Tìm Mua @tm.ID] @ten"></a>
                         <span>@tm.NgayDang</span><br/>
                        <p class="autohide chaobanpreview">@tm.MoTa</p>
                    </li>
            }
        </ul>
        <!-- end panel content -->
    </div>
</div>
<!--	-->
<h2>Rao vặt mới</h2>
<!-- -->
<div class="css3droppanel">
    <input type="checkbox" id="paneltoggle3" checked="checked" />
    <label for="paneltoggle3" title="Click to open Panel">
    </label>
    <div class="content">
        <!--panel content goes here-->
        <ul class="counter">
            <!---->
            @for (int i = 0; i < Model.ListRaoVat.Count; i++)
            {
                Data_DAO_DTO_Lib.DTO.RAOVAT_DTO tm = Model.ListRaoVat[i];
        
                 <li @if (i % 2 == 0)
                     {@Html.Raw("class='shadow_item'")}>

                     
                        <h3><a href="RaoVat/ChiTiet/@tm.ID">@tm.ChuDe </a></h3>
                        <span class="quanTamRaoVat" accesskey="@tm.ID" title="Quan tâm tìm mua: @tm.ChuDe"></span>
                        <a class="mailToMini" title="Liên hệ với người tìm mua: @tm.ChuDe" href="/Home/LienHe/@Model.ListRaoVat[i].IDTaiKhoanRaoVat/[Rao vặt @tm.ID] @tm.ChuDe"></a>
                        <span>@tm.ThoiGianRao</span><br/>
                        <p class="autohide chaobanpreview">@tm.NoiDung</p>
                    </li>
            }
        </ul>
        <!-- end panel content -->
    </div>
</div>
<!--	-->

